import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

import Layout from '@/layout/index'
const routes = [
  {
    path: '/',
    name: 'login',
    component: () => import('@/views/login/login.vue')
  },
  {
    path: '/home',
    name: 'Home',
    component: Layout,
    children: [
      {
        path: 'home',
        name: 'Home',
        component: () => import('@/views/home/home/index.vue')
      },
      {
        path: 'onlineMonitoring',
        name: 'onlineMonitoring',
        component: () => import('@/views/home/onlineMonitoring/index.vue')
      },
      {
        path: 'controlMode',
        name: 'controlMode',
        component: () => import('@/views/home/controlMode/index.vue')
      },
      {
        path: 'system',
        name: 'system',
        component: () => import('@/views/home/system/index.vue')
      },
      {
        path: 'regulation',
        name: 'regulation',
        component: () => import('@/views/home/regulation/index.vue')
      },
      {
        path: 'equipmentControl',
        name: 'equipmentControl',
        component: () => import('@/views/home/equipmentControl/index.vue')
      },
      {
        path: 'recordList',
        name: 'recordList',
        component: () => import('@/views/home/recordList/index.vue')
      },
      {
        path: 'alarmRecord',
        name: 'alarmRecord',
        component: () => import('@/views/home/alarmRecord/index.vue')
      },
      {
        path: 'systemRecord',
        name: 'systemRecord',
        component: () => import('@/views/home/systemRecord/index.vue')
      },
      {
        path: 'attributeSetting',
        name: 'attributeSetting',
        component: () => import('@/views/home/attributeSetting/index.vue')
      },
      {
        path: 'conditionSetting',
        name: 'conditionSetting',
        component: () => import('@/views/home/conditionSetting/index.vue')
      },
      {
        path: 'missionExecutionSettings',
        name: 'missionExecutionSettings',
        component: () => import('@/views/home/missionExecutionSettings/index.vue')
      },
      {
        path: 'temperatureRegulation',
        name: 'temperatureRegulation',
        component: () => import('@/views/home/temperatureRegulation/index.vue')
      },
      {
        path: 'AirTemperatureRegulation',
        name: 'AirTemperatureRegulation',
        component: () => import('@/views/home/AirTemperatureRegulation/index.vue')
      },
      {
        path: 'timedControl',
        name: 'timedControl',
        component: () => import('@/views/home/timedControl/index.vue')
      },
      {
        path: 'AirTemperatureRegulation_c',
        name: 'AirTemperatureRegulation_c',
        component: () => import('@/views/home/AirTemperatureRegulation_c/index.vue')
      },
      {
        path: 'system_login',
        name: 'system_login',
        component: () => import('@/views/home/system_login/index.vue')
      }
    ]
  }
]

const router = new VueRouter({
  // mode: 'history',`
  // base: process.env.BASE_URL,
  routes
})

export default router
